home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 254 < prev    next >
Encoding:
Text File  |  1996-08-06  |  903 b   |  21 lines

  1. Newsgroups: comp.std.c
  2. Path: howland.reston.ans.net!torn!sq!msb
  3. From: msb@sq.com (Mark Brader)
  4. Subject: Re: Two questions - Pointer equality and ...
  5. Message-ID: <1996Jan31.172724.17337@sq.com>
  6. Organization: SoftQuad Inc., Toronto, Canada
  7. References: <4elq8a$j0b@taurus.fccc.edu> <TANMOY.96Jan30150808@qcd.lanl.gov> <9601310155.AA07417@dxmint.cern.ch> <4emonm$kqc@fnclub.fnal.gov>
  8. Date: Wed, 31 Jan 1996 17:27:24 GMT
  9.  
  10. > Logically the proper tye of a string literal should be const char*
  11. > rather than char* ...
  12.  
  13. Actually, the type of a string literal N characters long is char[N+1].
  14. You can see this by using sizeof.  ("N characters long" is handwaving,
  15. of course, but good enough for this purpose, I think.)
  16. -- 
  17. Mark Brader, msb@sq.com        "do right; have fun; make money"
  18. SoftQuad Inc., Toronto              -- Ian Darwin on Yuri Rubinsky (1952-96)
  19.  
  20. My text in this article is in the public domain.
  21.